/*
 * addon.h
 *
 *  Created on: 2010-1-7
 *      Author: gavinkwoe
 */

#ifndef ADDON_SETTING_H_
#define ADDON_SETTING_H_

#include "addon_features.h"
#include "addon_std.h"
#include "addon_objbase.h"

/*************************************************************************
* MACRO
*************************************************************************/

#define DIRECTION_CLOCKWISE_0		(0)
#define DIRECTION_CLOCKWISE_90		(90)
#define DIRECTION_CLOCKWISE_270		(270)

/*************************************************************************
* INTERFACE
*************************************************************************/

ADDON_INTERFACE_( IAddonSetting, 1, IObject )
{
	__INHERIT_FROM( IObject )

	ADDON_METHOD( Attach )			( ADDON_REF(IObject) thiz, IN void * handle );

	ADDON_METHOD( SetDirection )	( ADDON_REF(IObject) thiz, IN unsigned long dir );
	ADDON_METHOD( GetDirection )	( ADDON_REF(IObject) thiz, IN unsigned long * dir );

	ADDON_METHOD( SetFont )			( ADDON_REF(IObject) thiz, IN ADDON_REF(IObject) pobj );
	ADDON_METHOD( GetFont )			( ADDON_REF(IObject) thiz, IN ADDON_PREF(IObject) ppobj );

	ADDON_METHOD( SetVertSpace )	( ADDON_REF(IObject) thiz, IN unsigned long space );
	ADDON_METHOD( GetVertSpace )	( ADDON_REF(IObject) thiz, IN unsigned long * pspace );
};

/*************************************************************************
* DECLARATION
*************************************************************************/

#if defined(__cplusplus)
extern "C" {
#endif	// #if defined(__cplusplus)

ADDON_IMPORT ADDON_REF(IObject)	addon_create_setting( void * reserved );

#if defined(__cplusplus)
}
#endif	// #if defined(__cplusplus)

/*************************************************************************
* MACRO
*************************************************************************/

#define IAddonSetting_VTBL( p )				ADDON_GET_VTBL_(p, IAddonSetting)
#define IAddonSetting_CALL( p, a )			IAddonSetting_VTBL(p)->a
#define IAddonSetting_Attach( p, a )		IAddonSetting_CALL( p, Attach )( p, a )
#define IAddonSetting_SetDirection( p, a )	IAddonSetting_CALL( p, SetDirection )( p, a )
#define IAddonSetting_GetDirection( p, a )	IAddonSetting_CALL( p, GetDirection )( p, a )
#define IAddonSetting_SetFont( p, a )		IAddonSetting_CALL( p, SetFont )( p, a )
#define IAddonSetting_GetFont( p, a )		IAddonSetting_CALL( p, GetFont )( p, a )
#define IAddonSetting_SetVertSpace( p, a )	IAddonSetting_CALL( p, SetVertSpace )( p, a )
#define IAddonSetting_GetVertSpace( p, a )	IAddonSetting_CALL( p, GetVertSpace )( p, a )

#endif /* ADDON_SETTING_H_ */
